package com.example.cocaro;

import android.os.Bundle;
import android.app.Activity;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.view.Menu;
import android.view.View;

public class MainActivity extends Activity {
	DrawView drawView;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		//setContentView(R.layout.activity_main);
		drawView=new DrawView(this);
		drawView.setBackgroundColor(Color.WHITE);
		setContentView(drawView);
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.main, menu);
		return true;
	}
	
}
class DrawView extends View{
	Paint paint=new Paint();
	public DrawView(Context context){
		super(context);
		paint.setColor(Color.RED);
	}
	@Override
	public void onDraw(Canvas canvas) 
	{
		canvas.drawLine(0, 0, 100, 100, paint);
		canvas.drawLine(100, 0, 0, 100, paint);
	}
}
